package com.syh.jn.scm.service.api.supplier.finance.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

public interface CostBillEnums {

  /**
   * 服务商确认状态
   */
  @AllArgsConstructor
  @Getter
  public enum State {


    //订单状态2为已挂起，这里没有已挂起概念，统一状态
    CANCEL(Short.valueOf("-1"),"已取消订单","收入单"),
    STAY_CONFIRM(Short.valueOf("0"), "待确认", "费用单"),
    CONFIRM(Short.valueOf("1"), "已确认", "费用单"),
    STATEMENT(Short.valueOf("3"), "已生成对账单", "费用单");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static State valueOf(Short status) {
      switch (status) {
        case -1:
          return CANCEL;
        case 0:
          return STAY_CONFIRM;
        case 1:
          return CONFIRM;
        case 3:
          return STATEMENT;
      }
      return null;
    }
  }

  // 上下游确认状态
  @AllArgsConstructor
  @Getter
  public enum ConfirmState {
    STAY_CONFIRM(Short.valueOf("0"), "上游或下游待确认", "费用单"),
    CONFIRM(Short.valueOf("1"), "上游或下游已确认", "费用单");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static ConfirmState valueOf(Short status) {
      switch (status) {
        case 0:
          return STAY_CONFIRM;
        case 1:
          return CONFIRM;
      }
      return null;
    }


  }


}
